package com.cykj.faceledtv.netty;


import com.cykj.faceledtv.entity.NettyReceiverModel;

/**
 * netty 监听
 *
 * @author jzh
 * @date 2018/11/06 11:05
 */
public interface NettyListener {

    int STATUS_CONNECT_SUCCESS = 1;

    int STATUS_CONNECT_CLOSED = 0;

    int STATUS_CONNECT_ERROR = 4;
    /**
     * 心跳读超时
     */
    int STATUS_HEART_READ_TIME_OUT = 2;
    /**
     * 心跳写超时
     */
    int STATUS_HEART_WHITE_TIME_OUT = 3;
    /**
     * 读写超时
     */
    int STATUS_HEART_ALL_TIME_OUT = 5;

    /**
     * 当接收到系统消息
     */
    void onMessageResponse(NettyReceiverModel model);

    /**
     * 当服务状态发生变化时触发
     */
    void onServiceStatusConnectChanged(int statusCode);
}
